<?php
/* *
 * 功能：支付宝即时到账api
 * 日期：2016-02-17
 * 源码来自：资源e站（Zye.cc）
 * 资源分享：www.zye.cc
 */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>支付宝即时到账交易接口接口</title>
</head>
<?php


require_once("alipay.config.php");
require_once("lib/alipay_submit.class.php");

/**************************请求参数**************************/

        //支付类型
        $payment_type = "1";
        //必填
        $notify_url = "http://www.svipzan.com/GHB/alipay/notify_url.php";

        $return_url = "http://www.svipzan.com/GHB/alipay/return_url.php";
       


        $out_trade_no = $_POST['WIDout_trade_no'];
        //必填


        $subject = $_POST['WIDsubject'];
        //必填

        $total_fee = $_POST['WIDtotal_fee'];
        //必填

       

        $body = '';
        
        $show_url = '';
        

        
        $anti_phishing_key = "";
       

        
        $exter_invoke_ip = "";
       



$parameter = array(
		"service" => "create_direct_pay_by_user",
		"partner" => trim($alipay_config['partner']),
		"seller_email" => trim($alipay_config['seller_email']),
		"payment_type"	=> $payment_type,
		"notify_url"	=> $notify_url,
		"return_url"	=> $return_url,
		"out_trade_no"	=> $out_trade_no,
		"subject"	=> $subject,
		"total_fee"	=> $total_fee,
		"body"	=> $body,
		"show_url"	=> $show_url,
		"anti_phishing_key"	=> $anti_phishing_key,
		"exter_invoke_ip"	=> $exter_invoke_ip,
		"_input_charset"	=> trim(strtolower($alipay_config['input_charset']))
);

//建立请求
$alipaySubmit = new AlipaySubmit($alipay_config);
$html_text = $alipaySubmit->buildRequestForm($parameter,"get", "确认");
echo $html_text;

?>
</body>
</html>